<template>
  <div class="todo-stats">
    <div class="stats-item">
      <span class="stats-label">总计:</span>
      <span class="stats-value">{{ total }}</span>
    </div>
    <div class="stats-item">
      <span class="stats-label">已完成:</span>
      <span class="stats-value">{{ completed }}</span>
    </div>
    <div class="stats-item">
      <span class="stats-label">未完成:</span>
      <span class="stats-value">{{ active }}</span>
    </div>
  </div>
</template>

<script setup>
import { defineProps } from 'vue'

defineProps({
  total: {
    type: Number,
    default: 0
  },
  completed: {
    type: Number,
    default: 0
  },
  active: {
    type: Number,
    default: 0
  }
})
</script>

<style scoped>
.todo-stats {
  display: flex;
  justify-content: space-around;
  background: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-item {
  text-align: center;
}

.stats-label {
  color: #666;
  font-size: 14px;
  margin-right: 5px;
}

.stats-value {
  font-weight: bold;
  color: #42b983;
  font-size: 16px;
}
</style> 